package com.huawei.appgallery.wishlist.ui.cardkit.card;

import android.content.Context;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
import android.text.style.TypefaceSpan;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.RequiresApi;
import com.huawei.appgallery.foundation.card.base.card.BaseDistCard;
import o.cgz;
import o.chy;
import o.dce.a;
import o.dce.e;
import o.dce.j;
import o.evx;

public class WishNotFoundCard extends BaseDistCard {
    public WishNotFoundCard(Context context) {
        super(context);
    }

    @RequiresApi(api = 23)
    public cgz ˏ(View view) {
        ˎ((TextView) view.findViewById(e.ʿॱ));
        ʽ(view);
        return this;
    }

    private void ˎ(TextView textView) {
        String string = this.ʼॱ.getString(j.ʽॱ);
        CharSequence spannableString = new SpannableString(this.ʼॱ.getString(j.ʼॱ, new Object[]{string}));
        int indexOf = spannableString.toString().indexOf(string);
        spannableString.setSpan(new ForegroundColorSpan(this.ʼॱ.getResources().getColor(a.ˏ)), indexOf, string.length() + indexOf, 33);
        spannableString.setSpan(new TypefaceSpan(this.ʼॱ.getResources().getString(j.ˎ)), indexOf, string.length() + indexOf, 33);
        textView.setText(spannableString);
    }

    public void ॱ(final chy o_chy) {
        if (o_chy != null && ˉ() != null) {
            ˉ().setOnClickListener(new evx(this) {
                final /* synthetic */ WishNotFoundCard ॱ;

                public void ˋ(View view) {
                    o_chy.ˏ(8, this.ॱ);
                }
            });
        }
    }
}
